﻿using QG.FrontDesk.BLL.IService;
using QG.FrontDesk.DAL.IRepository;
using QG.FrontDesk.Model;
using System.Collections.Generic;

namespace QG.FrontDesk.BLL.Service
{
    public class ResumesByCompanyService : IResumesByCompanyService
    {
        private IResumesByCompanyRepository _resumesByCompanyRepository;

        public ResumesByCompanyService(IResumesByCompanyRepository resumesByCompanyRepository)
        {
            _resumesByCompanyRepository = resumesByCompanyRepository;
        }
        /// <summary>
        /// 删除简历
        /// </summary>
        /// <param name="PRId"></param>
        /// <returns></returns>
        public int DeleteResume(int PRId)
        {
            return _resumesByCompanyRepository.DeleteResume(PRId);

        }

        /// <summary>
        /// 得到简历
        /// </summary>
        /// <returns></returns>
        public List<Position_ResumeInfo> GetResumeInfos(int CompId, short statu)
        {
            return _resumesByCompanyRepository.GetResumeInfos(CompId, statu);
        }
        /// <summary>
        /// 修改状态为已查看
        /// </summary>
        /// <param name="PRId"></param>
        /// <returns></returns>
        public int UpdateLookStatu(int PRId)
        {
            return _resumesByCompanyRepository.UpdateResumeStatu(PRId);
        }

        /// <summary>
        /// 修改简历状态
        /// </summary>
        /// <param name="PRId"></param>
        /// <param name="statu"></param>
        /// <returns></returns>
        public int UpdateResumeStatu(int PRId, short statu) {
            return _resumesByCompanyRepository.UpdateResumeStatu(PRId,statu);
        }
    }
}
